package com.amat0urheu.service;


import com.amat0urheu.pojo.ReturnRes;
import com.amat0urheu.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

public interface UserService extends IService<User> {

    boolean usernameIsRepeat(String username);

    User getByUserName(String username);

    int getIdByUserName(String username);

    PageInfo<User> getAllUserByPage(int pageNum, int pageSize);

    ReturnRes searchUserByPage(String key, String value, int pageNum, int pageSize);

    void updateScoreByUid(int uid,int score);

    ReturnRes addSome(MultipartFile file) throws IOException;


    void checkIfSuperUser(String name);

    ReturnRes updatePassWord(String oldPassword, String newPassword,String user);
}